package entity;


public class Manager extends Employee {
    private double monthlySalary;
    private double bonus;

    public Manager(String name, String empId, double monthlySalary, double bonus) {
        super(name, empId);
        this.monthlySalary = monthlySalary;
        this.bonus = bonus;
    }

    @Override
    public double calculateSalary() {
        return monthlySalary + bonus;
    }

    @Override
    public String generatePaySlip() {
        return "===== 工资条 =====\n" +
                "员工姓名：" + getName() + "\n" +
                "员工工号：" + getEmpId() + "\n" +
                "员工类型：管理人员\n" +
                "月薪资标准：" + monthlySalary + "元\n" +
                "奖金金额：" + bonus + "元\n" +
                "应发薪资：" + calculateSalary() + "元\n" +
                "==================";
    }
}